]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix audio volume icon
authorGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 22 Oct 2010 13:31:58 +0000 (15:31 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 22 Oct 2010 13:52:59 +0000 (15:52 +0200)
_volumeChanged should not update the icon if the sink is muted.
Fixes the case when shell is started with a muted sink (_mutedChanged
is called before _volumeChanged).

https://bugzilla.gnome.org/show_bug.cgi?id=632868

js/ui/status/volume.js

index 15cc1f178c11bf0e56c50711f0d587ca467c77bf..be8abd6354ca5774d0b4f7e591eb6c86cef8c1d9 100644 (file)
@@ -102,7 +102,6 @@ Indicator.prototype = {
             this._outputVolumeId = this._output.connect('notify::volume', Lang.bind(this, this._volumeChanged, '_output'));
             this._mutedChanged (null, null, '_output');
             this._volumeChanged (null, null, '_output');
-            this.setIcon(this._volumeToIcon(this._output.volume));
         } else {
             this._outputSwitch.label.text = _("Output: Muted");
             this._outputSwitch.setToggleState(false);
@@ -208,7 +207,7 @@ Indicator.prototype = {
     _volumeChanged: function(object, param_spec, property) {
         this[property+'Slider'].setValue(this[property].volume / VOLUME_MAX);
         this._updateLabel(property);
-        if (property == '_output')
+        if (property == '_output' && !this._output.is_muted)
             this.setIcon(this._volumeToIcon(this._output.volume));
     },